package GUI;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import GUI.Log.LogController;

public class LaunchMenu extends JFrame{
	/**
	 * @TODO
	 */
	private static final long serialVersionUID = 1L;

	public LaunchMenu(String launchName)
	{
		super(launchName);
		
		JMenu file = new JMenu("File");
		file.setMnemonic('F');		
		JMenuItem exitItem = new JMenuItem("Exit");
		exitItem.setMnemonic('x');
		file.add(exitItem);
		
		JMenu view = new JMenu("View");
		view.setMnemonic('v');
		JMenuItem logItem = new JMenuItem("Log");
		logItem.setMnemonic('l');
		view.add(logItem);
		
		logItem.addActionListener(
			new ActionListener(){
				public void actionPerformed(ActionEvent e)
				{
					new LogController();
				}
			}
		);	
		exitItem.addActionListener(
			new ActionListener(){
				public void actionPerformed(ActionEvent e)
				{
					System.exit(0);
				}}
			);						
		JMenuBar bar = new JMenuBar();
		setJMenuBar(bar);
		bar.add(file);
		bar.add(view);
		
		getContentPane();
		setSize(200, 200);
		setVisible(true);
		}
	}

